package com.woniu.mapper.mallSystem;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.model.mallSystem.entity.Category;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 品类表 Mapper 接口
 * </p>
 *
 * @author Lzj
 * @since 2023-10-19
 */
@Mapper
public interface CategoryMapper extends BaseMapper<Category> {

    /**
     * 品类条件查询
     */
    List<Category> queryCategoryByCondition (Map<String, Object> condition);

    /**
     * 根据父id删除子品类
     */
    @Delete("delete from t_category where parent_category_id = #{id}")
    void deleteSubType(Long id);

}
